// 你是一段成熟的代码，要学会自己改bug
'use strict';


export default {
    /**
     * 消息提示
     * @param that
     * @param params
     */
    message(that, params) {
        params['offset'] = 20;
        that.$notify(params);
    },
    /**
     * 错误消息提示
     * @param that
     * @param message
     */
    error(that, message) {
        this.message(that, {
            title: message,
            type: 'error'
        });
    },
    /**
     * 警告消息提示
     * @param that
     * @param message
     */
    warning(that, message) {
        this.message(that, {
            title: message,
            type: 'warning'
        });
    },
    /**
     * 成功消息提示
     * @param that
     * @param message
     */
    success(that, message) {
        this.message(that, {
            title: message,
            type: 'success'
        });
    }
}
